<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 产品规格 基类
 * @Entity
 * @Table(name="fa_prospecs", id={"id"})
 * @DDL("CREATE TABLE `fa_prospecs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pro_id` int(10) DEFAULT NULL COMMENT '产品id',
  `image` varchar(255) DEFAULT NULL COMMENT '规格图片',
  `name` varchar(20) DEFAULT NULL COMMENT '规格名称',
  `price` decimal(10,2) DEFAULT NULL COMMENT '价格',
  `vip_price` decimal(10,2) DEFAULT '0.00' COMMENT '会员价格',
  `num` int(10) DEFAULT '9999' COMMENT '数量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='产品规格'")
 * @property int $id 
 * @property int $proId 产品id
 * @property string $image 规格图片
 * @property string $name 规格名称
 * @property float $price 价格
 * @property float $vipPrice 会员价格
 * @property int $num 数量
 */
abstract class ProspecsBase extends Model
{
    /**
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 产品id
     * pro_id
     * @Column(name="pro_id", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $proId;

    /**
     * 获取 proId - 产品id
     *
     * @return int
     */ 
    public function getProId()
    {
        return $this->proId;
    }

    /**
     * 赋值 proId - 产品id
     * @param int $proId pro_id
     * @return static
     */ 
    public function setProId($proId)
    {
        $this->proId = $proId;
        return $this;
    }

    /**
     * 规格图片
     * image
     * @Column(name="image", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 规格图片
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 规格图片
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 规格名称
     * name
     * @Column(name="name", type="varchar", length=20, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 规格名称
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 规格名称
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 价格
     * price
     * @Column(name="price", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $price;

    /**
     * 获取 price - 价格
     *
     * @return float
     */ 
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * 赋值 price - 价格
     * @param float $price price
     * @return static
     */ 
    public function setPrice($price)
    {
        $this->price = $price;
        return $this;
    }

    /**
     * 会员价格
     * vip_price
     * @Column(name="vip_price", type="decimal", length=10, accuracy=2, nullable=true, default="0.00", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var float
     */
    protected $vipPrice;

    /**
     * 获取 vipPrice - 会员价格
     *
     * @return float
     */ 
    public function getVipPrice()
    {
        return $this->vipPrice;
    }

    /**
     * 赋值 vipPrice - 会员价格
     * @param float $vipPrice vip_price
     * @return static
     */ 
    public function setVipPrice($vipPrice)
    {
        $this->vipPrice = $vipPrice;
        return $this;
    }

    /**
     * 数量
     * num
     * @Column(name="num", type="int", length=10, accuracy=0, nullable=true, default="9999", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $num;

    /**
     * 获取 num - 数量
     *
     * @return int
     */ 
    public function getNum()
    {
        return $this->num;
    }

    /**
     * 赋值 num - 数量
     * @param int $num num
     * @return static
     */ 
    public function setNum($num)
    {
        $this->num = $num;
        return $this;
    }

}
